﻿using System;

namespace BoatNGoat.Server
{
    public class ServerTime
    {
        public TimeSpan ElapsedGameTime { get; private set; }

        public bool IsRunningSlowly { get; private set; }

        public TimeSpan TotalGameTime { get; private set; }

        public int FrameCount { get; internal set; }

        public ServerTime()
        {
        }

        public ServerTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime)
        {
            this.TotalGameTime = totalGameTime;
            this.ElapsedGameTime = elapsedGameTime;
        }

        public ServerTime(TimeSpan totalGameTime, TimeSpan elapsedGameTime, bool isRunningSlowly)
        {
            this.TotalGameTime = totalGameTime;
            this.ElapsedGameTime = elapsedGameTime;
            this.IsRunningSlowly = isRunningSlowly;
        }

        internal void Update(TimeSpan totalGameTime, TimeSpan elapsedGameTime, bool isRunningSlowly)
        {
            this.TotalGameTime = totalGameTime;
            this.ElapsedGameTime = elapsedGameTime;
            this.IsRunningSlowly = isRunningSlowly;
        }
    }
}